/*
 * rtc.h
 *
 *  Created on: Sep 11, 2013
 *      Author: Ken Arok
 *
 *
 * \brief Real Time Clock library.
 *
 * Copyright (c) 2013 PT Hanindo Automation Solutions. All rights reserved.
 *
 */

/** \section section_rtc_driver Real Time Clock (RTC) Driver
 * \brief This module describes how to user API library of the RTC.
 */

#ifndef RTC_H_
#define RTC_H_

/*! \defgroup RTC_DRIVERS The Driver of RTC
 * \{
 */

/** \brief Stucture of RTC string.
 *
 */
typedef struct {
	char date1[13];		//!< RTC date, format "Aug 21, 2013"
	char date2[11];		//!< RTC date, format "21/08/2013"
	char time[9];		//!< RTC Time, format "10:18:45"
}rtc_string_t;


/** \brief Write Real Time Clock (RTC) string to chip.
 * <pre><rtc.h></pre>
 * <pre>\b void \b vWriteRTC(rtc_string_t *_rtc_string);</pre>
 * @param _rtc_string	Pointer to RTC string structure want to be written.
 *
 */
void vWriteRTC(rtc_string_t *_rtc_string);

/** \brief Read Real Time Clock (RTC) into string.
 * <pre><rtc.h></pre>
 * <pre>\b void \b vReadRTC(rtc_string_t *_rtc_string);</pre>
 * @param _rtc_string	Pointer to RTC string structure where RTC will be copied.
 *
 */
void vReadRTC(rtc_string_t *_rtc_string);


/**
 * \}
 */

#endif /* RTC_H_ */
